from utils.api import API
from django.conf.urls import url
from need.forms import *
from need.views import views_admin,views_info

baseUrl = "/api/need/"

addNeedAPI = API(AddNeedForm, method='POST', moduleUrl='raise/', urlPrefix=baseUrl)
getNeedListAPI = API(GetNeedListForm, method='POST', moduleUrl='list/', urlPrefix=baseUrl)
needOptionAPI = API(NeedOptionForm, method='POST', moduleUrl='option/', urlPrefix=baseUrl)
needScreenAPI = API(NeedScreenForm, method='POST', moduleUrl='screen/', urlPrefix=baseUrl)
needAnnounceAPI = API(NeedAnnounceForm, method='POST', moduleUrl='onedemand/', urlPrefix=baseUrl)


urlpatterns = [
    url(addNeedAPI.moduleUrl, views_admin.addNeed),
    url(getNeedListAPI.moduleUrl, views_info.getNeedList),
    url(needOptionAPI.moduleUrl, views_admin.needOption),
    url(needScreenAPI.moduleUrl, views_info.needScreen),
    url(needAnnounceAPI.moduleUrl, views_info.needAnnounce),
]